import React, { Component } from "react";

export default class HelloWorld extends Component<{data: any}, {sss: any}> {
    constructor(props: any) {
        super(props);
        this.state = {
            sss: ''
        }
    }
    
    
    componentDidUpdate(prevProps: any) {
        if(prevProps.data.time === this.props.data.time) {
            return;
        }
        this.setState({
            sss:'123456'
        })
    }
    
    render() {
        return (<div>
            <span>{this.props.data.msg}</span><br/>
            <span>{this.props.data.time}</span><br/>
            <span>stateSSS: {this.state.sss}</span>
        </div>);
    }    
}
